package com.ashin.service.impl;

import com.ashin.entity.bo.Auth;
import com.ashin.mapper.AuthMapper;
import com.ashin.service.AuthService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

@Service
public class AuthServiceImpl extends ServiceImpl<AuthMapper, Auth> implements AuthService {
    @Override
    public Auth queryIfAuth(String number) {
        LambdaQueryWrapper<Auth> queryWrapper = new QueryWrapper<Auth>().lambda();
        queryWrapper.eq(Auth::getNumber, number);
        return baseMapper.selectOne(queryWrapper);
    }
}
